"""
@author: xiangping
@contact: xiangpingbu@gmail.com
@time: 2020/1/13 6:44 下午
@file: shaojie_model_input_po
@Desc:
"""
from app.exts import db
from app.models.po.base_po import BasePO


class LuGangDataPO(db.Model, BasePO):
    __tablename__ = "cg_lt_gl04_lugang_data"
    __bind_key__ = "serve_engine"
    id = db.Column(db.Integer, primary_key=True)
    date_time = db.Column(db.DateTime())
    gmt_create = db.Column(db.DateTime())
    gmt_modified = db.Column(db.DateTime())
    name = db.Column(db.VARCHAR(100))
    value = db.Column(db.FLOAT())
    level = db.Column(db.VARCHAR(20))


class LuGangQinshiDataPO(db.Model, BasePO):
    __tablename__ = "cg_lt_gl04_lugang_qinshi_data"
    __bind_key__ = "serve_engine"
    id = db.Column(db.Integer, primary_key=True)
    date_time = db.Column(db.DateTime())
    gmt_create = db.Column(db.DateTime())
    gmt_modified = db.Column(db.DateTime())
    name = db.Column(db.VARCHAR(100))
    value = db.Column(db.FLOAT())
    level = db.Column(db.VARCHAR(20))


class LuGangQinshiResultPO(db.Model, BasePO):
    __tablename__ = "cg_lt_gl04_lugang_qinshi_result"
    __bind_key__ = "serve_engine"
    id = db.Column(db.Integer, primary_key=True)
    date_time = db.Column(db.DateTime())
    gmt_create = db.Column(db.DateTime())
    gmt_modified = db.Column(db.DateTime())
    name = db.Column(db.VARCHAR(100))
    direction = db.Column(db.VARCHAR(10))
    value = db.Column(db.FLOAT())
    level = db.Column(db.VARCHAR(20))

class LuGangActivinessDataPO(db.Model, BasePO):
    __tablename__ = "cg_lt_gl04_lugang_activiness_data"
    __bind_key__ = "serve_engine"
    id = db.Column(db.Integer, primary_key=True)
    date_time = db.Column(db.DateTime())
    gmt_create = db.Column(db.DateTime())
    gmt_modified = db.Column(db.DateTime())
    name = db.Column(db.VARCHAR(100))
    value = db.Column(db.FLOAT())
    level = db.Column(db.VARCHAR(20))
    type = db.Column(db.VARCHAR(20))


class LuGangActivinessPredictPO(db.Model, BasePO):
    __tablename__ = "cg_lt_gl04_lugang_activiness_predict_result"
    __bind_key__ = "serve_engine"
    id = db.Column(db.Integer, primary_key=True)
    date_time = db.Column(db.DateTime())
    gmt_create = db.Column(db.DateTime())
    gmt_modified = db.Column(db.DateTime())
    current = db.Column(db.FLOAT())
    predict = db.Column(db.FLOAT())
    type = db.Column(db.VARCHAR(20))
    level = db.Column(db.VARCHAR(20))


if __name__ == "__main__":
    from sqlalchemy.schema import CreateTable

    print(CreateTable(LuGangActivinessPredictPO.__table__))
